<!DOCTYPE html>
<head>
    <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="You need to customize the build scripts. These script automate the publishing of your PDFs and web outputs through shell scripts on the command line.">
<meta name="keywords" content="publishing,  build scripts, generating outputs, building, publishing">
<title>10. Configure the build scripts | 常见故障解决方案</title>
<link rel="stylesheet" href="css/syntax.css">


<link rel="stylesheet" type="text/css" href="css/font-awesome.min-4.5.0.css">
<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">-->
<link rel="stylesheet" href="css/modern-business.css">
<link rel="stylesheet" href="css/lavish-bootstrap.css">
<link rel="stylesheet" href="css/customstyles.css">
<link rel="stylesheet" href="css/theme-blue.css">


<script type="text/javascript" charset="utf8" src="js/jquery.js"></script>
<script src="js/jquery.cookie.min.js"></script>
<script src="js/jquery.navgoco.min.js"></script>


<script src="js/bootstrap.min.js"></script>
<script src="js/anchor.min.js"></script>
<script src="js/toc.js"></script>
<script src="js/customscripts.js"></script>

<link rel="shortcut icon" href="images/favicon.ico">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://cdn.bootcss.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://cdn.bootcss.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<link rel="alternate" type="application/rss+xml" title="" href="feed.xml">

    <script>
        $(document).ready(function() {
            // Initialize navgoco with default options
            $("#mysidebar").navgoco({
                caretHtml: '',
                accordion: true,
                openClass: 'active', // open
                save: false, // leave false or nav highlighting doesn't work right
                cookie: {
                    name: 'navgoco',
                    expires: false,
                    path: '/'
                },
                slide: {
                    duration: 400,
                    easing: 'swing'
                }
            });

            $("#collapseAll").click(function(e) {
                e.preventDefault();
                $("#mysidebar").navgoco('toggle', false);
            });

            $("#expandAll").click(function(e) {
                e.preventDefault();
                $("#mysidebar").navgoco('toggle', true);
            });

        });

    </script>
    <script>
        $(function () {
            $('[data-toggle="tooltip"]').tooltip()
        })
    </script>

    

</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container topnavlinks">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="fa fa-home fa-lg navbar-brand" href="index.html">&nbsp;<span class="projectTitle"> 常见故障解决方案</span></a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                <!-- entries without drop-downs appear here -->
                
                
                
                <li><a href="index.html">重新搜索</a></li>
                
                
                
                <!-- entries with drop-downs appear here -->
                <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
                
                
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">其他文档入口<b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        
                        
                        <li><a href="index.html">常见故障解决方案</a></li>
                        
                        
                        
                        <li><a href="p1_sample1.html">常用语法</a></li>
                        
                        
                    </ul>
                </li>
                
                
                
			<li><a class="email" title="问题反馈" href="#" onclick="javascript:window.location='mailto:Merlin_Wu@apllogistics.com?subject=《常见故障解决方案》反馈&body=%0D____________________________________________________________________%0D问题页面：%0910. Configure the build scripts %0D问题地址：%09' + window.location.href;"><i class="fa fa-envelope-o"></i> 邮件反馈</a><li>

		
                <!--comment out this block if you want to hide search-->
                <li>
                    <!--start search-->
                    <!-- <div id="search-demo-container">
                        <input type="text" id="search-input" placeholder="search...">
                        <ul id="results-container"></ul>
                    </div>
                    <script src="js/jekyll-search.js" type="text/javascript"></script>
                    <script type="text/javascript">
                            SimpleJekyllSearch.init({
                                searchInput: document.getElementById('search-input'),
                                resultsContainer: document.getElementById('results-container'),
                                dataSource: 'search.json',
                                searchResultTemplate: '<li><a href="{url}" title="10. Configure the build scripts">{title}</a></li>',
                    noResultsText: 'No results found.',
                            limit: 10,
                            fuzzy: true,
                    })
                    </script> -->
                    <!--end search-->
                </li>
            </ul>
        </div>
        </div>
        <!-- /.container -->
</nav>

<!-- Page Content -->
<div class="container">
    <div class="col-lg-12">&nbsp;</div>
    <!-- Content Row -->
    <div class="row">
        <!-- Sidebar Column -->
        <div class="col-md-3">

          












<!--  -->


<ul id="mysidebar" class="nav">
    <li class="sidebarTitle">目录 </li>
    
    
    
        
    
    <li>
        <a href="#">常用操作</a>
        <ul>
            
            
            
            <li><a href="index.html">搜索</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_introduction.html">Introduction</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_supported_features.html">Supported features</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_about.html">About the theme author</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_support.html">Support</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Release Notes</a>
        <ul>
            
            
            
            <li><a href="mydoc_release_notes_60.html">6.0 Release notes</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_release_notes_50.html">5.0 Release notes</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Installation</a>
        <ul>
            
            
            
            <li><a href="mydoc_about_ruby_gems_etc.html">About Ruby, Gems, Bundler, etc.</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_install_jekyll_on_mac.html">Install Jekyll on Mac</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_install_jekyll_on_windows.html">Install Jekyll on Windows</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Authoring</a>
        <ul>
            
            
            
            <li><a href="mydoc_pages.html">Pages</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_posts.html">Posts</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_lists.html">Lists</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_conditional_logic.html">Conditional logic</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_content_reuse.html">Content reuse</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_collections.html">Collections</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_webstorm_text_editor.html">WebStorm editor tips</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_atom_text_editor.html">Atom editor tips</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Navigation</a>
        <ul>
            
            
            
            <li><a href="mydoc_sidebar_navigation.html">Sidebar navigation</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_yaml_tutorial.html">YAML tutorial in the context of Jekyll</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_tags.html">Tags</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_series.html">Series</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Formatting</a>
        <ul>
            
            
            
            <li><a href="mydoc_adding_tooltips.html">Tooltips</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_alerts.html">Alerts</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_icons.html">Icons</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_images.html">Images</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_code_samples.html">Code samples</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_labels.html">Labels</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_hyperlinks.html">Links</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_navtabs.html">Navtabs</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_tables.html">Tables</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_syntax_highlighting.html">Syntax highlighting</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_workflow_maps.html">Workflow maps</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Handling reviews</a>
        <ul>
            
            
            
            <li><a href="mydoc_commenting_on_files.html">Commenting on files</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Publishing</a>
        <ul>
            
            
            
            <li><a href="mydoc_build_arguments.html">Build arguments</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_themes.html">Themes</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_generating_pdfs.html">Generating PDFs</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_help_api.html">Help APIs and UI tooltips</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_search_configuration.html">Search configuration</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_iterm_profiles.html">iTerm profiles</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_push_build_to_server.html">Pushing builds to server</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_no_password_prompts_scp.html">Getting around the password prompts in SCP</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_publishing_github_pages.html">Publishing on Github Pages</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Special layouts</a>
        <ul>
            
            
            
            <li><a href="mydoc_kb_layout.html">Knowledge-base layout</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_glossary.html">Glossary layout</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_faq_layout.html">FAQ layout</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_scroll.html">Scroll layout</a></li>
            
            
            
            
            
            
            <li><a href="mydoc_shuffle.html">Shuffle layout</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Troubleshooting</a>
        <ul>
            
            
            
            <li><a href="mydoc_troubleshooting.html">Troubleshooting</a></li>
            
            
            
            
        </ul>
        
        
    
    <li>
        <a href="#">Tag archives</a>
        <ul>
            
            
            
            <li><a href="mydoc_tag_archives_overview.html">Tag archives overview</a></li>
            
            
            
            <li class="subfolders">
                <a href="#">Tag archive pages</a>
                <ul>
                    
                    
                    
                    <li><a href="tag_formatting.html">Formatting pages</a></li>
                    
                    
                    
                    
                    
                    <li><a href="tag_navigation.html">Navigation pages</a></li>
                    
                    
                    
                    
                    
                    <li><a href="tag_content_types.html">Content types pages</a></li>
                    
                    
                    
                    
                    
                    <li><a href="tag_publishing.html">Publishing pages</a></li>
                    
                    
                    
                    
                    
                    <li><a href="tag_special_layouts.html">Special layout pages</a></li>
                    
                    
                    
                    
                    
                    <li><a href="tag_collaboration.html">Collaboration pages</a></li>
                    
                    
                    
                    
                    
                    <li><a href="tag_troubleshooting.html">Troubleshooting pages</a></li>
                    
                    
                    
                </ul>
            </li>
            
            
            
            
        </ul>
        
        
        
        <!-- if you aren't using the accordion, uncomment this block:
           <p class="external">
               <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
           </p>
           -->
    </li>
</ul>
</div>

<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
<script>$("li.active").parents('li').toggleClass("active");</script>

    <!-- Content Column -->
    <div class="col-md-9">
        <div class="post-header">
   <h1 class="post-title-main">10. Configure the build scripts</h1>
</div>



<div class="post-content">

   
    <div class="summary">You need to customize the build scripts. These script automate the publishing of your PDFs and web outputs through shell scripts on the command line.</div>
   

    
    
<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
<script>
$( document ).ready(function() {
  // Handler for .ready() called.

$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' });

/* this offset helps account for the space taken up by the floating toolbar. */
$('#toc').on('click', 'a', function() {
  var target = $(this.getAttribute('href'))
    , scroll_target = target.offset().top

  $(window).scrollTop(scroll_target - 10);
  return false
})
  
});
</script>

<div id="toc"></div>

    

    

    

    

  <div class="seriesContext">
    <div class="btn-group">
        <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Getting Started <span class="caret"></span></button>
        <ol class="dropdown-menu">
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <li class="active"> → 10. Configure the build scripts</li>
            
            
            
        </ol>
    </div>
</div>

<h2 id="about-the-build-scripts">About the build scripts</h2>

<p>The mydoc project has 5 build scripts and a script that runs them all. These scripts will require a bit of detail to configure. Every team member who is publishing on the project should set up their folder structure in the way described here.</p>

<h2 id="get-set-up">Get Set Up</h2>

<p>Your command-line terminal opens up to your user name (for example, <code class="highlighter-rouge">Users/tjohnson</code>). I like to put all of my projects from repositories into a subfolder under my username called “projects.” This makes it easy to get to the projects from the command line. You can vary from the project organization I describe here, but following the pattern I outline will make configuration easier.</p>

<p>To set up your projects:</p>

<ol>
  <li>Set up your Jekyll theme in a folder called “docs.” All of the source files for every project the team is working on should live in this directory. Most likely you already either downloaded or cloned the jekyll-documentation-theme. Just rename the folder to “docs” and move it into the projects folder as shown here.</li>
  <li>
    <p>In the same root directory where the docs folder is, create another directory parallel to docs called doc_outputs. </p>

    <p>Thus, your folder structure should be something like this:</p>

    <div class="highlighter-rouge"><pre class="highlight"><code>projects
- docs
- doc_outputs
</code></pre>
    </div>

    <p>The docs folder contains the source of all your files, while the doc_outputs contains the site outputs.</p>
  </li>
</ol>

<h2 id="configure-the-build-scripts">Configure the Build Scripts</h2>

<p>For the mydocs project, you’ll see a series of build scripts for each project. There are 5 build scripts, described in the following sections. Note that you really only need to run the last one, e.g., mydoc_all.sh, because it runs all of the build scripts. But you have to make sure each script is correctly configured so that they all build successfully.</p>

<div class="alert alert-success" role="alert"><i class="fa fa-check-square-o"></i> <b>Tip:</b> In the descriptions of the build scripts, “mydoc” is used as the sample project. Substitute in whatever your real project name is.</div>

<h3 id="mydoc1multiservepdfsh">mydoc_1_multiserve_pdf.sh</h3>

<p>Here’s what this script looks like:</p>

<div class="highlighter-rouge"><pre class="highlight"><code>echo 'Killing all Jekyll instances'
kill -9 $(ps aux | grep '[j]ekyll' | awk '{print $2}')
clear


echo "Building PDF-friendly HTML site for Mydoc Writers ..."
jekyll serve --detach --config configs/mydoc/config_writers.yml,configs/mydoc/config_writers_pdf.yml
echo "done"

echo "Building PDF-friendly HTML site for Mydoc Designers ..."
jekyll serve --detach --config configs/mydoc/config_designers.yml,configs/mydoc/config_designers_pdf.yml
echo "done"

echo "All done serving up the PDF-friendly sites. Now let's generate the PDF files from these sites."
echo "Now run . mydoc_2_multibuild_pdf.sh"
</code></pre>
</div>

<p>After killing all existing Jekyll instances that may be running, this script serves up a PDF friendly version of the docs (in HTML format) at the destination specified in the configuration file.</p>

<p>Each of your configuration files needs to have a destination like this: <code class="highlighter-rouge">../doc_outputs/mydoc/adtruth-java</code>. That is, the project should build in the doc_outputs folder, in a subfolder that matches the project name.</p>

<p>The purpose of this script is to make a version of the HTML output that is friendly to the Prince XML PDF generator. This version of the output strips out the sidebar, topnav, and other components to just render a bare-bones HTML representation of the content.</p>

<p>Customize the script with your own PDF configuration file names.</p>

<h3 id="mydoc2multibuildpdfsh">mydoc_2_multibuild_pdf.sh</h3>

<p>Here’s what this script looks like:</p>

<div class="highlighter-rouge"><pre class="highlight"><code># Doc Writers
echo "Building the Mydoc Writers PDF ..."
prince --javascript --input-list=../doc_outputs/mydoc/writers-pdf/prince-file-list.txt -o mydoc/files/mydoc_writers_pdf.pdf;
echo "done"

# Doc Designers
echo "Building Mydoc Designers PDF ..."
prince --javascript --input-list=../doc_outputs/mydoc/designers-pdf/prince-file-list.txt -o mydoc/files/mydoc_designers_pdf.pdf;
echo "done"

echo "All done building the PDFs!"
echo "Now build the web outputs: . mydoc_3_multibuild_web.sh"
</code></pre>
</div>

<p>This script builds the PDF output using the Prince command. The script reads the location of the prince-file-list.txt file in the PDF friendly output folder (as defined in the previous script) and builds a PDF.</p>

<p>The Prince build command takes an input parameter (<code class="highlighter-rouge">--input-list=</code>) that lists where all the pages are (prince-file-list.txt), and then combines all the pages into a PDF, including cross-references and other details. The Prince build command also specifies the output folder (<code class="highlighter-rouge">-o</code>).</p>

<p>The prince-file-list.txt file (which simply contains a list of URLs to HTML pages) is generated by iterating through the table of contents (mydoc_sidebar.yml) and creating a list of URLs. You can open up prince-file-list.txt in the doc output to ensure that it has a list of absolute URLs (not relative) in order for Prince to build the PDF.</p>

<p>This is one way the configuration file for the PDF-friendly output differs from the HTML output. (If the PDF isn’t building, it’s because the prince-file-list.txt in the output is empty or it contains relative URLs.)</p>

<p>The Prince build script puts the output PDF into the mydoc/mydoc/files directory. Now you can reference the PDF file in your HTML site. For example, on the homepage you can allow people to download a PDF of the content at files/adtruth_dotnet_pdf.pdf.</p>

<h3 id="mydoc3multibuildwebsh">mydoc_3_multibuild_web.sh</h3>

<p>Here’s what this script looks like:</p>

<div class="highlighter-rouge"><pre class="highlight"><code>kill -9 $(ps aux | grep '[j]ekyll' | awk '{print $2}')
clear

echo "Building Mydoc Writers website..."
jekyll build --config configs/doc/config_writers.yml
# jekyll serve --config configs/doc/config_writers.yml
echo "done"

echo "Building Mydoc Designers website..."
jekyll build --config configs/doc/config_designers.yml
# jekyll serve --config configs/doc/config_designers.yml
echo "done"

echo "All finished building all the web outputs!!!"
echo "Now push the builds to the server with . mydoc_4_publish.sh"
</code></pre>
</div>

<p>After killing all Jekyll instances, this script builds an HTML version of the projects and puts the output into the doc_outputs folder. This is the version of the content that users will mainly navigate. Since the sites are built with relative links, you can browse to the folder on your local machine, double-click the index.html file, and see the site.</p>

<p>The <code class="highlighter-rouge">#</code> part below the <code class="highlighter-rouge">jekyll build</code> commands contains a serve command that is there for mere convenience in case you want to serve up just one site among many that you’re building. For example, if you don’t want to build everything — just one site — you might just use the serve command instead. (Anything after # in a YAML file comments out the content.)</p>

<h3 id="mydoc4publishsh">mydoc_4_publish.sh</h3>

<p>Here’s what this script looks like:</p>

<div class="highlighter-rouge"><pre class="highlight"><code>echo "remove previous directory and any subdirectories without a warning prompt"
ssh yourusername@yourdomain.com 'rm -rf /var/www/html/yourpublishingdirectory'

echo "push new content into the remote directory"
scp -r -vrC ../mydoc_outputs/doc-writers yourusername@yourdomain:/var/www/html/yourpublishingdirectory

echo "All done pushing doc outputs to the server"

</code></pre>
</div>

<p>This script assumes you’re publishing content onto a Linux server.</p>

<p>Change <code class="highlighter-rouge">yourusername</code> to your own user name.</p>

<p>This script first removes the project folder on /var/www/html/yourpublishingdirectory site and then transfers the content from doc_outputs over to the appropriate folder in /var/www/html/yourpublishingdirectory.</p>

<p>Note that the delete part of the script (<code class="highlighter-rouge">rm -rf</code>) works really well. It annihilates a folder in a heartbeat and doesn’t give you any warning prompts, so make sure you have it set up correctly.</p>

<p>Also, in case you haven’t set up the SSH publishing without a password, see <a href="mydoc_no_password_prompts_scp.html">Getting around the password prompts in SCP</a>. Otherwise the script will stop and ping you to enter your password for each directory it transfers.</p>

<h3 id="optional-push-to-repositories">(Optional) Push to repositories</h3>

<p>This script isn’t included in the theme, but you might optionally decide to push the built sites into another github repository. For example, if you’re using Cloud Cannon to deploy your sites, you can have Cloud Cannon read files from a specific Github repository.</p>

<p>Here’s what this script looks like:</p>

<div class="highlighter-rouge"><pre class="highlight"><code>cd doc_outputs/mydoc/designers
git add --all
git commit -m "publishing latest version of docs"
git push
echo "All done pushing to Github"
echo "Here's the link to download the guides..."
cd ../../docs
</code></pre>
</div>

<p>This final script simply makes a commit into a Github repo for one of your outputs.</p>

<p>The doc_outputs/mydoc/designers contains the site output from mydoc, so when you push content from this folder into Github, you’re actually pushing the HTML site output into Github, not the mydoc source files.</p>

<p>Your delivery team can also grab the site output from these repos. After downloading it, the person unzips the folder and sees the website folders inside.</p>

<h3 id="mydocallsh">mydoc_all.sh</h3>

<p>Here’s what this script looks like:</p>

<div class="highlighter-rouge"><pre class="highlight"><code>. deviceinsight_1_multiserve_pdf.sh; . deviceinsight_2_multibuild_pdf.sh; . deviceinsight_3_multibuild_web.sh; . deviceinsight_4_publish.sh;
</code></pre>
</div>

<p>This script simply runs the other scripts. To sequence the commands, you just separate them with semicolons. (If you added the optional script, be sure to include it here.)</p>

<p>After you’ve configured all the scripts, you can run them all by running <code class="highlighter-rouge">. mydoc_all.sh</code>. You might want to run this script at lunchtime, since it may take about 10 to 20 minutes to completely build the scripts. But note that since everything is now automated, you don’t have to do anything at all after executing the script. After the script finishes, everything is published and in the right location.</p>

<h2 id="test-out-the-scripts">Test out the scripts</h2>

<p>After setting up and customizing the build scripts, run a few tests to make sure everything is generating correctly. Getting this part right is somewhat difficult and may likely require you to tinker around with the scripts a while before it works flawlessly.</p>

<p>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</p>



    <div class="tags">
        
        <b>Tags: </b>
        
        
        
        <a href="tag_publishing.html" class="btn btn-default navbar-btn cursorNorm" role="button">publishing</a>
        
        
        
    </div>

    

</div>

<hr class="shaded"/>

<footer>
            <div class="row">
                <div class="col-lg-12 footer">
               &copy;2016 . All rights reserved. <br />
<span>Page last updated:</span> November 30, 2016<br/> Site last generated: Oct 8, 2016 <br />
<!-- <p><img src="images/company_logo.png" alt="Company logo"/></p> -->
                </div>
            </div>
</footer>


    </div>
    <!-- /.row -->
</div>
<!-- /.container -->
    </div>

</body>

</html>
